package com.guijq.selfcode.javase;

/**
 * @author yangjf
 * @time 2019-06-17 11:05
 */
public class Test4 {
    static long a[] = new long[10];
    int[] b = new int[5];
    char c ;


    public static void main(String[] args) {
        System.out.println(a[4]);
        float f = 13.1f;

        Test4 test4 = new Test4();
        System.out.println(test4.c);

        String s1 = "hello";
        String s2 = new String("hello");
        String s3 = s1;
        String s4 = "hello";
        String s5 = new String("hello");

        System.out.println(s1 == s2);
        System.out.println(s2 == s3);
        System.out.println(s1==s3);
        System.out.println(s1 == s4);
        System.out.println(s1==s5);
        System.out.println(s2 == s5);
        System.out.println("-------------");
        s1 = "hello2";
        System.out.println(s1 == s3);
        System.out.println(s1 == s4);
        System.out.println(s3 == s4);
//        s2 = new String("hello2");
//        System.out.println(s1.equals(s2));
//        System.out.println(s2.equals(s3));
//        System.out.println(s1.equals(s3));
//        System.out.println(s1.equals(s4));
//        System.out.println(s1.equals(s5));

    }
}
